package com.android.marble;

import com.stickycoding.rokon.DrawPriority;
import com.stickycoding.rokon.RokonActivity;

import android.content.Context;
import android.util.Log;
import android.view.Display;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.WindowManager;
import android.widget.Button;
import android.widget.TextView;
import android.widget.Toast;

public class MarbleActivity extends RokonActivity {
	private GameScene scene;
    Display display;// = getWindowManager().getDefaultDisplay(); 
    private float WIDTH;// = display.getWidth();
    private float HEIGHT;// = display.getHeight();
    @Override
	public void onCreate() {
    	
    	getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_HIDDEN);
    	
    	display = getWindowManager().getDefaultDisplay(); 
    	WIDTH = display.getWidth();
    	HEIGHT = display.getHeight();
    	
        debugMode();
        forceFullscreen();
        forcePortrait(); 
        setGameSize(WIDTH, HEIGHT);
        setDrawPriority(DrawPriority.PRIORITY_VBO); 
        setGraphicsPath("textures/");
        createEngine(true);
        
        LayoutInflater.from(this).inflate(R.layout.run_ui, getInterface());  
        Button bReset = (Button)findViewById(R.id.bReset);  
        
        bReset.setOnClickListener(new MyOnClickListener(scene));
        
    }
    
    @Override
	public void onLoadComplete() {
        Textures.load();
        setScene(scene = new GameScene(WIDTH,HEIGHT));
    }
}

/**
 * define the listener of the button click.
 */
class MyOnClickListener implements OnClickListener {
    private GameScene mScene;
    MyOnClickListener(GameScene scene) {
        mScene = scene;
    }
    public void onClick(View v) {
    }
}